#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int N;
int sum = 0;
int a[510][510];

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);
    cin >> N;
    for (int i = 1; i <= N; i++)
    {
        for (int j = i + 1; j <= N; j++)
        {
            cin >> a[i][j];
            a[j][i] = a[i][j];
        }
    }
    for (int i = 1; i <= N; i++)
    {
        sort(a[i] + 1, a[i] + N + 1);
        sum = (sum > a[i][N - 1]) ? sum : a[i][N - 1];
    }
    cout << 1 << endl << sum << endl;
    return 0;
}


//取次大